﻿<UserControl x:Class="Mosaic.Controls.WidgetControl"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Name="this"
        Background="Transparent" AllowDrop="True" RenderTransformOrigin="0.5,0.5" Opacity="0"
        MouseLeftButtonDown="UserControlMouseLeftButtonDown" MouseLeftButtonUp="UserControlMouseLeftButtonUp" MouseLeave="UserControlMouseLeave">
    <!--<UserControl.Effect>
        <DropShadowEffect Direction="-85" BlurRadius="5" ShadowDepth="3" Opacity="0.3" />
    </UserControl.Effect>-->
    <UserControl.Resources>
        <Storyboard x:Key="LoadAnim" FillBehavior="Stop" Completed="StoryboardCompleted">
            <DoubleAnimation Storyboard.TargetName="Scale" Storyboard.TargetProperty="ScaleX" From="0.8" To="1" Duration="0:0:0.4" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetName="Translate" Storyboard.TargetProperty="X" From="150" To="0" Duration="0:0:0.6" DecelerationRatio="0.7"/>
            <DoubleAnimation Storyboard.TargetName="this" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.4"/>
        </Storyboard>
        <Storyboard x:Key="MouseDownAnim">
            <DoubleAnimation Storyboard.TargetName="Scale" Storyboard.TargetProperty="ScaleX" To="0.95" Duration="0:0:0.05" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
        </Storyboard>
        <Storyboard x:Key="MouseUpAnim">
            <DoubleAnimation Storyboard.TargetName="Scale" Storyboard.TargetProperty="ScaleX" To="1" Duration="0:0:0.25" AccelerationRatio="0.3" DecelerationRatio="0.7"/>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.RenderTransform>
        <TransformGroup>
            <ScaleTransform x:Name="Scale" ScaleX="1" ScaleY="{Binding ElementName=Scale, Path=ScaleX}"/>
            <TranslateTransform x:Name="Translate"/>
        </TransformGroup>
    </UserControl.RenderTransform>
    <!--Background="#0f92d6"-->
    <Grid Name="Root">

    </Grid>
</UserControl>
